<!doctype html>
<html class="no-js" lang="">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <title>编辑个人资料</title>
        
        <meta name="viewport" content="width=device-width, initial-scale=1  user-scalable=no">
         <meta name="description" content="">
        <link rel="stylesheet" href="<?php echo $_BASE_DIR?>point/css/pc.css">
        <link rel="stylesheet" href="<?php echo $_BASE_DIR ?>point/editinfo/css/main.css">
        <link rel="stylesheet" href="<?php echo $_BASE_DIR ?>point/editinfo/css/index.css">
        <script src="<?php echo $_BASE_DIR ?>point/editinfo/js/vendor/modernizr-2.8.3.min.js"></script>
        <script type="text/javascript" src="<?php echo $_BASE_DIR ?>point/editinfo/js/jquery-3.2.0.min.js"></script>
    <script type="text/javascript">

</script>
    </head>

    <body>
 
    <div class="header">
      <a href="javascript:history.back(-1);">  <div class="back_icon"></div></a>
        <div class="tuiguang_header">编辑个人资料</div>
    </div>

	<form action="/baodan/editinfo" name="form" method="post" enctype="multipart/form-data"  onsubmit="return adduser()">
        <div class="editor_user_info">
            <div class="user_info_item">
                <div class="float_left">上传头像</div>
                <div class="float_right user_pic_warp">
                    <span class="user_pic_icon">
                   <?php $avtar = $_BASE_DIR.'baodannew/images/avatar-img.jpg';
                     if($user->avatar) $avtar = $user->avatar;
                   
                    ?>
                        <img src="<?php  echo $avtar?>" id="previewImg">
                    <input type="file" accept="image/*;capture=camera" name="upfile" id="takePhoto">
                    </span>
                </div>
            </div>
    
            

        </div>
   <center> <input type="submit" class="ensure_btn" name="" value="确认"  />  
            </center> 

	</form>
    <script type="text/javascript">
   		  function adduser(){
    	

          }
    
        $(function () {
   
    
            $("#inputImg").change(function(){
                var file = document.getElementById("inputImg").files[0];
                var url = window.URL.createObjectURL(file);
                $("#previewImg").attr('src',url);
               
            });
            $("#takePhoto").change(function(){
                var file = document.getElementById("takePhoto").files[0];
                var url = window.URL.createObjectURL(file);
                $("#previewImg").attr('src',url);
               
            });
 

        })
    </script>
    </body>
</html>
